package com.etc.zmall.service;

import org.apache.ibatis.annotations.Param;

import com.etc.entity.Shopc;
import com.github.pagehelper.PageInfo;

/**
 * 
 * <p>
 * Title: ShopCartService
 * </p>
 * 
 * <p>
 * Description:
 * </p>
 * 
 * @author knowno
 * 
 * @date 2021年1月11日
 * 
 */
public interface ShopCartService {
	/**
	 * 查询全部购物车
	 * 
	 * @param keywords
	 * @return
	 */
	public PageInfo<Shopc> showShopCar(int userid, int page, int limit, String keywords);

	/**
	 * 删除购物车里的·商品
	 * 
	 * @param userid
	 * @param goodsname
	 * @return
	 */
	public boolean delGoods(int userid, String goodsname);

	/**
	 * 将商品添加至购物车
	 * 
	 * @param shopc
	 * @return
	 */
	public boolean addGoods(Shopc shopc);

	/**
	 * 获取商店名
	 * 
	 * @param shop
	 * @param shopid
	 * @return
	 */
	public Shopc showShopName(Shopc shopc);

	/**
	 * 
	 * 
	 * <p>
	 * Title: selectByGoodsIdAndUserId
	 * </p>
	 * 
	 * <p>
	 * Description: 根据用户编号和商品编号来查询购物车
	 * </p>
	 * 
	 * @param userid
	 * @param goodsid
	 * @return
	 */
	Shopc selectByGoodsIdAndUserId(Integer userid, Integer goodsid);

	/**
	 * 
	 * 
	 * <p>
	 * Title: updateShopCart
	 * </p>
	 * 
	 * <p>
	 * Description: 修改购物车，数量和金额
	 * </p>
	 * 
	 * @param shopc
	 * @return
	 */
	boolean updateShopCart(Shopc shopc);

}
